<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('ServiceReview/index')}">服务款审批报审表管理</a></li>
            <!-- <if condition="($Role eq 2) AND ($userrole['role'] lt 5)"> -->
            
            <!-- </if> -->
            <li><a href="{:U('ServiceReview/add')}">新增服务款审批报审</a></li>
        </ul> 
        
        <table class="table table-hover table-bordered">
            <thead>
                <tr>
                    <th>编号</th>
                    <th>审批发起单位</th>
                    <th>工程名称</th>
                    <th>审批状态</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th width="120">{:L('ACTIONS')}</th>
                </tr>
            </thead>
             <tbody>
            <foreach name="results" item="vo">
                <tr>
                    <td>{$vo.code}</td>
                    <td>{$vo.department_name_first}</td>
                    <td>{$vo.job_content}</td>
                    <td class="text-center">
                        <if condition="$vo['audit_status'] eq 1">
                            审核中 (<php>echo intval($vo['audit_level']) - 1;</php> / <php>echo (intval(($vo['level'] != '' ? $vo['level'] : 0)) + 1) * 2;</php> )
                        <elseif  condition="$vo['audit_status'] eq 2" />
                        	已驳回
                        <else />
                            已通过
                        </if>
                    </td>
					<td>{$vo.real_name}</td>
				    <td>{$vo.publish_time}</td>
                    <td>
                        <a href='{:U("ServiceReview/view",array("id"=>$vo["id"]))}'><if condition="$vo['isaudit'] eq 2">查看<else />
                        <if condition="$current_user_role eq 4">
                        查看
                        <else />
                        审核
                        </if>
                            
                        </if></a>
                        |
						<a href='{:U("ServiceReview/auditHistory", array("id"=>$vo["id"]))}'>审批流程</a>
                        <if condition="$current_user_role eq 0">
                        |
                        <a class="js-ajax-delete" href="{:U('ServiceReview/delete',array('id'=>$vo['id']))}">删除</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>            
        </table>
        <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
</body>
</html>